<?php
/**
 * Copyright (c) 2006, PORTALIER Julien
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @package      FeatherPHP
 * @subpackage   Core
 * @copyright    Copyright (c) 2006, Julien PORTALIER
 * @link         http://feather.portalier.com
 * @license      http://www.opensource.org/licenses/mit-license.php The MIT License
 */

function array_to_xmlstring(array $a)
{
	$str  = '<?xml version="1.0" ?><root>';
	foreach($a as $d)
	{
		$str .= '<data';
		foreach($d as $k => $v)
		{
			$v = htmlspecialchars($v);
			$str .= " $k=\"$v\"";
		}
		$str .= '/>';
	}
	$str .= '</root>';
	return $str;
}
?>